// 分类模型
const { Collect } = require('../../../models/collect');
// 统一数据返回类
const { DataReturn } = require('../../../common/returnclass');

module.exports = async (req, res) => {
	// 商品id
	let { user_id,goods_id } = req.query;
	console.log(req.query);
	
	let collect = await Collect.findOne({user_id,goods_id});
	// 没有收藏
	if (!collect) DataReturn.getData(res,400,collect,'获取失败')
	
	DataReturn.getData(res,200,collect,'获取成功')

}